Avoid undefined behavior with huge regexp interval counts.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 12 Dec 2013 19:23:25 +0000 (11:23 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 12 Dec 2013 19:23:25 +0000 (11:23 -0800)
commit758a9836694ce425866db326ac869246d07aa40e
tree237235c60f272a691e86c154d5c2ea831c7435ab
parent88cb79276a4c8a38c32e5b5770805ca54716b726
Avoid undefined behavior with huge regexp interval counts.

* regex.c (GET_INTERVAL_COUNT): Rename from 'GET_UNSIGNED_NUMBER',
since it's now specialized to interval counts. All uses changed.
Do not assume wrapraound on signed integer overflow.
(regex_compile): Simplify based on the above changes.
src/ChangeLog
src/regex.c